CC = gcc
JAVAC = javac

all:libjnitest.so JniExample.class 

%.class: %.java
	$(JAVAC) $<

JAVAINCLUDE=/usr/lib/jvm/java-7-openjdk-amd64/include/

CFLAGS +=-I ${JAVAINCLUDE}

libjnitest.so:jnitest.c
	${CC} -shared -fpic -o $@ $^ ${CFLAGS}

clean:
	rm -f libjnitest.so
	rm -f *.class
